"""
接口对象层
"""
import requests

# 创建 登录接口 对象类
class IhrmLogin(object):
    # 封装登录方法
    @classmethod
    def login(cls, json_data):
        url = "http://ihrm-test.itheima.net/api/sys/login"
        header = {"Content-Type": "application/json"}
        resp = requests.post(url=url, headers=header, json=json_data)
        return resp


def get_header():
    json_data = {"mobile": "13800000002", "passwprd": "123456"}
    resp = IhrmLogin.login(json_data)
